package com.tao.YanMoDesignPattern.Order.case2_Computer;

import com.tao.YanMoDesignPattern.Order.case1_Computer.Command;

/**
 * @Author Mi_Tao
 * @Date 2023/8/26
 * @Description
 * @Version 1.0
 **/
public class ResetCommand implements Command {
    // 持有真实命令的接收者对象
    private MainBoardApi mainBoard;

    public ResetCommand(MainBoardApi mainBoard) {
        this.mainBoard = mainBoard;
    }
    @Override
    public void execute() {
        // 对于命令对象，根本不知道怎么开机，会转调主板对象
        // 让主板完成重启
        this.mainBoard.reset();
    }
}
